<?php

namespace App\Admin\Renderable;

use Dcat\Admin\Grid;
use Dcat\Admin\Grid\LazyRenderable;
use App\Models\Dept;

class DeptTable extends LazyRenderable
{
    public function grid(): Grid
    {
        return Grid::make(new Dept(), function (Grid $grid) {

            $grid->column('id')->sortable();
            $grid->column('deptname');
            $grid->column('fuzeren');

            $grid->quickSearch(['deptname']);

            $grid->paginate(10);
            $grid->disableActions();
        });
    }
}
